package cn.dujc.superkid.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * @author du
 * date 2018/8/4 下午1:12
 */
public class AnswerListResult extends ListDataEntity implements Parcelable {
    private List<AnswerEntity> list;

    public List<AnswerEntity> getList() { return list;}

    public void setList(List<AnswerEntity> list) { this.list = list;}

    public static class AnswerEntity implements Parcelable{
        /**
         * id : 152
         * problem_students_id : 1665
         * problem_posttime : 1512822613
         * problem_content : 老师好！第15届二年级中环杯 初赛2015年第17题
         * 图中，我们称粗实线围成的2×3 的长方形为一个“宫”。请在图中所有空格里，分别填入1-6中的某个数字，使得每行、每列和每个“宫”内，数字1-6 都不重复出现。其中某两个空格之间的数表示该相邻两格内数字的和或者乘积。这道题看答案我们不知道是如何计算出来的？希望老师解答，谢谢！
         * answer_teacher_id : 19
         * answer_posttime : 1512910761
         * answer_content : <p>你好，这个题目可以到相应的视频学习，如果还是不明白的话，直接在视频下留言</p>
         * status : 2
         * problem_username : 诗晗
         * problem_avatar : http://api.niuwaketang.com/avatar/avatar.png
         * answer_teacher_nicename : 老师
         * answer_teacher_avatar : http://api.niuwaketang.com/avatar/teacher_avatar.png
         */

        private String id;//问题id
        private String problem_students_id;//提问用户id
        private String problem_posttime;//提问时间戳
        private String problem_content;//提问内容
        private String answer_teacher_id;//回复老师id
        private String answer_posttime;//回复时间戳
        private String answer_content;//回复内容
        private String status;//答疑状态（1-未处理，2-已处理）
        private String problem_username;//提问者姓名
        private String problem_avatar;//提问者头像
        private String answer_teacher_nicename;//回复老师名
        private String answer_teacher_avatar;//回复老师头像

        public String getId() { return id;}

        public void setId(String id) { this.id = id;}

        public String getProblem_students_id() { return problem_students_id;}

        public void setProblem_students_id(String problem_students_id) { this.problem_students_id = problem_students_id;}

        public String getProblem_posttime() { return problem_posttime;}

        public void setProblem_posttime(String problem_posttime) { this.problem_posttime = problem_posttime;}

        public String getProblem_content() { return problem_content;}

        public void setProblem_content(String problem_content) { this.problem_content = problem_content;}

        public String getAnswer_teacher_id() { return answer_teacher_id;}

        public void setAnswer_teacher_id(String answer_teacher_id) { this.answer_teacher_id = answer_teacher_id;}

        public String getAnswer_posttime() { return answer_posttime;}

        public void setAnswer_posttime(String answer_posttime) { this.answer_posttime = answer_posttime;}

        public String getAnswer_content() { return answer_content;}

        public void setAnswer_content(String answer_content) { this.answer_content = answer_content;}

        public String getStatus() { return status;}

        public void setStatus(String status) { this.status = status;}

        public String getProblem_username() { return problem_username;}

        public void setProblem_username(String problem_username) { this.problem_username = problem_username;}

        public String getProblem_avatar() { return problem_avatar;}

        public void setProblem_avatar(String problem_avatar) { this.problem_avatar = problem_avatar;}

        public String getAnswer_teacher_nicename() { return answer_teacher_nicename;}

        public void setAnswer_teacher_nicename(String answer_teacher_nicename) { this.answer_teacher_nicename = answer_teacher_nicename;}

        public String getAnswer_teacher_avatar() { return answer_teacher_avatar;}

        public void setAnswer_teacher_avatar(String answer_teacher_avatar) { this.answer_teacher_avatar = answer_teacher_avatar;}

        @Override
        public int describeContents() { return 0; }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.id);
            dest.writeString(this.problem_students_id);
            dest.writeString(this.problem_posttime);
            dest.writeString(this.problem_content);
            dest.writeString(this.answer_teacher_id);
            dest.writeString(this.answer_posttime);
            dest.writeString(this.answer_content);
            dest.writeString(this.status);
            dest.writeString(this.problem_username);
            dest.writeString(this.problem_avatar);
            dest.writeString(this.answer_teacher_nicename);
            dest.writeString(this.answer_teacher_avatar);
        }

        public AnswerEntity() {}

        protected AnswerEntity(Parcel in) {
            this.id = in.readString();
            this.problem_students_id = in.readString();
            this.problem_posttime = in.readString();
            this.problem_content = in.readString();
            this.answer_teacher_id = in.readString();
            this.answer_posttime = in.readString();
            this.answer_content = in.readString();
            this.status = in.readString();
            this.problem_username = in.readString();
            this.problem_avatar = in.readString();
            this.answer_teacher_nicename = in.readString();
            this.answer_teacher_avatar = in.readString();
        }

        public static final Creator<AnswerEntity> CREATOR = new Creator<AnswerEntity>() {
            @Override
            public AnswerEntity createFromParcel(Parcel source) {return new AnswerEntity(source);}

            @Override
            public AnswerEntity[] newArray(int size) {return new AnswerEntity[size];}
        };
    }

    @Override
    public int describeContents() { return 0; }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeTypedList(this.list);
    }

    public AnswerListResult() {}

    protected AnswerListResult(Parcel in) {
        super(in);
        this.list = in.createTypedArrayList(AnswerEntity.CREATOR);
    }

    public static final Creator<AnswerListResult> CREATOR = new Creator<AnswerListResult>() {
        @Override
        public AnswerListResult createFromParcel(Parcel source) {return new AnswerListResult(source);}

        @Override
        public AnswerListResult[] newArray(int size) {return new AnswerListResult[size];}
    };
}
